package com.util;

public class UserUtils {

    private final static ThreadLocal<UserInfo> tlUser = new ThreadLocal<>();

    public static void setUser(UserInfo userInfo) {
        tlUser.set(userInfo);
    }

    public static UserInfo getUser() {
        return tlUser.get();
    }

    public static void clear() {
        tlUser.remove();
    }

}
